home *** CD-ROM | disk | FTP | other *** search
-
-
-
- LLLLOOOOCCCCKKKK____AAAALLLLLLLLOOOOCCCC((((DDDD3333)))) LLLLOOOOCCCCKKKK____AAAALLLLLLLLOOOOCCCC((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- _LLLL_OOOO_CCCC_KKKK______AAAA_LLLL_LLLL_OOOO_CCCC, _LLLL_OOOO_CCCC_KKKK______IIII_NNNN_IIII_TTTT - basic lock initialization
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////kkkkmmmmeeeemmmm....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////kkkkssssyyyynnnncccchhhh....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ddddddddiiii....hhhh>>>>
-
- lllloooocccckkkk____tttt ****LLLLOOOOCCCCKKKK____AAAALLLLLLLLOOOOCCCC((((uuuucccchhhhaaaarrrr____tttt _h_i_e_r_a_r_c_h_y,,,, ppppllll____tttt _m_i_n__p_l,,,,
- llllkkkkiiiinnnnffffoooo____tttt ****_l_k_i_n_f_o_p,,,, iiiinnnntttt _f_l_a_g))));;;;
-
- vvvvooooiiiidddd LLLLOOOOCCCCKKKK____IIIINNNNIIIITTTT((((lllloooocccckkkk____tttt ****_l_o_c_k_p,,,, uuuucccchhhhaaaarrrr____tttt _h_i_e_r_a_r_c_h_y,,,, ppppllll____tttt _m_i_n__p_l,,,,
- llllkkkkiiiinnnnffffoooo____tttt ****_l_k_i_n_f_o_p))));;;;
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _h_i_e_r_a_r_c_h_y Set to -1. Reserved for future use.
-
- _m_i_n__p_l Minimum priority level argument which asserts the minimum
- priority level that will be passed in with any attempt to
- acquire this lock [see _LLLL_OOOO_CCCC_KKKK(D3)].
-
- _l_k_i_n_f_o_p Set to -1. Reserved for future use.
-
- _f_l_a_g Specifies whether the caller is willing to sleep waiting for
- memory.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- LOCK_ALLOC dynamically allocates and initializes an instance of a basic
- lock. LOCK_INIT initializes an already-allocated instance of a basic
- lock. The lock is initialized to the unlocked state.
-
- If _f_l_a_g is set to KM_SLEEP, the caller will sleep if necessary until
- sufficient memory is available. If _f_l_a_g is set to KM_NOSLEEP, the caller
- will not sleep, but LOCK_ALLOC will return NULL if sufficient memory is
- not immediately available.
-
- RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
- Upon successful completion, LOCK_ALLOC returns a pointer to the newly
- allocated lock. If KM_NOSLEEP is specified and sufficient memory is not
- immediately available, LOCK_ALLOC returns a NULL pointer.
-
- mmmmiiiinnnn____ppppllll AAAArrrrgggguuuummmmeeeennnntttt
- The valid values for this argument are as follows:
-
- _pppp_llll_bbbb_aaaa_ssss_eeee Block no interrupts
-
- _pppp_llll_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt Block functions scheduled by itimeout and dtimeout
-
- _pppp_llll_dddd_iiii_ssss_kkkk Block disk device interrupts
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- LLLLOOOOCCCCKKKK____AAAALLLLLLLLOOOOCCCC((((DDDD3333)))) LLLLOOOOCCCCKKKK____AAAALLLLLLLLOOOOCCCC((((DDDD3333))))
-
-
-
- _pppp_llll_ssss_tttt_rrrr Block STREAMS interrupts
-
- _pppp_llll_hhhh_iiii Block all interrupts
-
- The notion of a _m_i_n__p_l assumes a defined order of priority levels. The
- following partial order is defined:
-
- _pppp_llll_bbbb_aaaa_ssss_eeee _<<<< _pppp_llll_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt _<<<<_==== _pppp_llll_dddd_iiii_ssss_kkkk_,,,,_pppp_llll_ssss_tttt_rrrr _<<<<_==== _pppp_llll_hhhh_iiii
-
- The ordering of _pppp_llll_dddd_iiii_ssss_kkkk and _pppp_llll_ssss_tttt_rrrr relative to each other is not defined.
-
- Setting a given priority level will block interrupts associated with that
- level as well as any levels that are defined to be less than or equal to
- the specified level. In order to be portable a driver should not acquire
- locks at different priority levels where the relative order of those
- priority levels is not defined above.
-
- The _m_i_n__p_l argument should specify a priority level that would be
- sufficient to block out any interrupt handler that might attempt to
- acquire this lock. In addition, potential deadlock problems involving
- multiple locks should be considered when defining the _m_i_n__p_l value. For
- example, if the normal order of acquisition of locks A and B (as defined
- by the lock hierarchy) is to acquire A first and then B, lock B should
- never be acquired at a priority level less than the _m_i_n__p_l for lock A.
- Therefore, the _m_i_n__p_l for lock B should be greater than or equal to the
- _m_i_n__p_l for lock A.
-
- Note that the specification of _m_i_n__p_l with a _LLLL_OOOO_CCCC_KKKK______AAAA_LLLL_LLLL_OOOO_CCCC call does not
- actually cause any interrupts to be blocked upon lock acquisition, it
- simply asserts that subsequent _LLLL_OOOO_CCCC_KKKK calls to acquire this lock will pass
- in a priority level at least as great as _m_i_n__p_l.
-
- LLLLeeeevvvveeeellll
- Base.
-
- SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
- May sleep if flag is set to _KKKK_MMMM______SSSS_LLLL_EEEE_EEEE_PPPP (_LLLL_OOOO_CCCC_KKKK______AAAA_LLLL_LLLL_OOOO_CCCC only) or if debugging
- locks are installed.
-
- Driver-defined basic locks and read/write locks may not be held across
- calls to this functions.
-
- Driver-defined sleep locks may be held across calls to this function
- regardless of the value of _f_l_a_g.
-
- RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
- LOCK(D3), LOCK_DEALLOC(D3), LOCK_DESTROY(D3), TRYLOCK(D3), UNLOCK(D3).
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-